#coding:utf-8

from wtforms import Form, TextAreaField, validators, PasswordField, IntegerField, DateTimeField, DateField


class LoginForm(Form):
    email = TextAreaField('email', [validators.Length(6, 50)])
    password = PasswordField('password', [validators.length(8, 50)])

class SignupForm(Form):
    email = TextAreaField('邮箱', [validators.Length(6, 50)])
    passwd = PasswordField('密码', [validators.length(8, 50)])

class AccountForm(Form):
    name = TextAreaField('名称', [validators.Length(1,15)])

class SubMessageForm(Form):
    sub_message = TextAreaField('订阅自动回复', [validators.length(1, 500)])

class AddUserForm(Form):
    user_email = TextAreaField('user_email', [validators.Length(6, 50)])
    user_name = TextAreaField('user_name', [validators.Length(1, 40)])
    user_type = IntegerField('user_type')

class AddAppForm(Form):
    app_name = TextAreaField('app_name', [validators.length(2, 50)])
    visitor = IntegerField('visitor', [validators.optional()])

class AppActiveForm(Form):
    time = DateField('time')
    amount = IntegerField('amount', [validators.number_range(0, 9000000)])



